home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1997 #1 / Amiga Plus CD - 1997 - No. 01.iso / pd / sonstiges / amiwin / install_amiwin < prev    next >
Text File  |  1985-03-23  |  7KB  |  283 lines

  1. (procedure check-system-version
  2.  (set exec-version (/ (getversion) 65536))
  3.  (if (< exec-version 37)
  4.   (abort "AmiWin 2.22demo needs at least Exec version 37.\n")
  5.  )
  6. )
  7.  
  8. (procedure select-destination-directory
  9.  (set @default-dest
  10.   (askdir
  11.    (prompt "Select the directory where you want to "
  12.     "install AmiWin 2.22demo. Most of the files do not "
  13.     "have to be copied if you accept the default.")
  14.    (help "Please specify the directory where you want "
  15.     "to install AmiWin 2.22demo. If you accept the "
  16.     "default, then the installation is done 'in-place', "
  17.     "i.e. no files have to be copied. If you specify a "
  18.     "different directory, then most of the files are "
  19.     "copied there during the installation.")
  20.    (default source-dir)
  21.   )
  22.  )
  23. )  
  24.  
  25. (procedure copy-files-to-destination
  26.  (if (= source-dir
  27.   (expandpath @default-dest))
  28.   (message "\nSource and destination directories are the same, "
  29.    "installing 'in-place'.")
  30.   (copyfiles
  31.    (source (tackon source-dir "x11"))
  32.    (dest "x11:")
  33.    (all)
  34.   )
  35.  )
  36.  (makedir "x11:Help" (infos))
  37.  (copyfiles
  38.   (source (tackon source-dir "AmiWin.guide"))
  39.   (dest "x11:Help")
  40.   (infos)
  41.  )
  42.  (copyfiles
  43.   (source (tackon source-dir "REGISTRATION"))
  44.   (dest "x11:Help")
  45.   (infos)
  46.  )
  47. )
  48.  
  49. (procedure copy-ppipc
  50.  (copylib (source (tackon source-dir "x11/libs/ppipc.library"))
  51.   (dest "libs:")
  52.   (optional "force" "askuser")
  53.   (prompt "The Installer is about to install ppipc.library "
  54.   "in your LIBS: directory.")
  55.   (help "AmiWin needs ppipc.library for the local transport. "
  56.   "If you skip this step during the installation, you have to "
  57.   "install ppipc.library manually somewhere within your LIBS: "
  58.   "assign.")
  59.   (confirm)
  60.  )
  61. )
  62.  
  63. (procedure ask-config
  64.  (set keymap-name
  65.   (select
  66.    (askchoice
  67.     (prompt "Please select a keyboard driver to be "
  68.      "used by AmiWin:")
  69.     (help "AmiWin supports different keyboard drivers, "
  70.      "which correspond to Workbench keyboard drivers. Please "
  71.      "select one.")
  72.     (choices "Canadien Français" "Suisse" "Schweiz" "Deutsch"
  73.      "Dansk" "Español" "Français" "British" "Icelandic" "Italiana" "Norsk" "Português"
  74.      "Svenskt" "American" "Dvorak")
  75.     (default 13)
  76.    )
  77.    "cdn" "ch1" "ch2" "d" "dk" "e" "f" "gb" "is" "i" "n" "po"
  78.    "s" "usa0" "usa2"
  79.   )
  80.  )
  81.  (set usemui
  82.   (askbool
  83.    (prompt "Do you want to use the optional MUI interface ?\n\n"
  84.     "You must have at least MUI 2.2 installed for it (not "
  85.     "included in this archive)")
  86.    (help "AmiWin has an optional MUI-based graphical frontend. "
  87.     "If you want to use it you must have MUI 2.2 or higher installed.")
  88.   )
  89.  )
  90.  (set driver-name
  91.   (select
  92.    (askchoice
  93.     (prompt "Please select a display driver to be "
  94.      "used by AmiWin:")
  95.     (help "AmiWin supports different display drivers for "
  96.      "different graphics boards and chipsets. Please "
  97.      "select one.")
  98.     (choices "RTG monochrome"
  99.      "OCS/ECS/AGA monochrome"
  100.      "OCS/ECS/AGA/A2024 4-256 colors"
  101.      "Picasso 256-col (original VT software)"
  102.      "CyberGraphX 40.55 or higher"
  103.      "Retina 256 colors"
  104.      "HRG 256-col (Merlin/Domino/VisionA)"
  105.      "Graffity 256 colors")
  106.     (default 0)
  107.    )
  108.    "rtg-1" "aga-1" "aga-8" "picasso-l-8" "cybergraphx-8" "retina-8" "hrg-8" "graffity-8"
  109.   )
  110.  )
  111.  (set pstacks
  112.   (askoptions
  113.    (prompt "Please select which protocol stack(s) you "
  114.     "want to use with AmiWin:")
  115.    (help "AmiWin can be used across a TCP/IP network. "
  116.     "If you want to use this feature please select the "
  117.     "protocol stack(s) you are using.")
  118.    (choices "AmiTCP/IP 2.x or higher" "AS-225 R2, I-225, MLink")
  119.    (default 0)
  120.   )
  121.  )
  122.  (set use-amitcp (= 1 (BITAND pstacks 1)))
  123.  (set use-as225 (= 2 (BITAND pstacks 2)))
  124. )      
  125.  
  126. (procedure set-env-vars
  127.  (set env-equal-envarc (= (expandpath "ENV:") (expandpath "ENVARC:")))
  128.  (if (not (exists "ENV:AMIWIN"))
  129.   (makedir "ENV:AMIWIN")
  130.  )
  131.  (if (not env-equal-envarc)
  132.   (if (not (exists "ENVARC:AMIWIN"))
  133.    (makedir "ENVARC:AMIWIN")
  134.   )
  135.  )
  136.  (if (exists "ENV:AMIWIN/XAW") 
  137.   (delete "ENV:AMIWIN/XAW")
  138.  )
  139.  (if (not env-equal-envarc)
  140.   (if (exists "ENVARC:AMIWIN/XAW") 
  141.    (delete "ENVARC:AMIWIN/XAW")
  142.   )
  143.  )
  144.  (textfile
  145.   (dest "ENV:AMIWIN/AWOPTIONS")
  146.   (append "-fp x11:lib/x11/fonts/misc\n")
  147.   (append (cat "-keymap " keymap-name "\n"))
  148.   (append "-lalt s\n")
  149.   (append (if usemui "" "nogui\n"))
  150.   (append "-ralt s\n")
  151.   (append "-reset 0\n")
  152.   (append (cat "-xsd " driver-name "\n"))
  153.  )
  154.  (if (not env-equal-envarc)
  155.   (copyfiles
  156.    (dest "ENVARC:AMIWIN")
  157.    (source "ENV:AMIWIN/AWOPTIONS")
  158.   )
  159.  )
  160.  (textfile
  161.   (dest "ENV:AMIWIN/XTRANSPORTS")
  162.   (append (if use-amitcp "amitcp\n" ""))
  163.   (append (if use-as225 "as225\n" ""))
  164.  )
  165.  (if (not env-equal-envarc)
  166.   (copyfiles
  167.    (dest "ENVARC:AMIWIN")
  168.    (source "ENV:AMIWIN/XTRANSPORTS")
  169.   )
  170.  )
  171.  (textfile
  172.   (dest "ENV:DISPLAY")
  173.   (append "local:0\n")
  174.  )
  175.  (if (not env-equal-envarc)
  176.   (copyfiles
  177.    (dest "ENVARC:")
  178.    (source "ENV:DISPLAY")
  179.   )
  180.  )
  181.  (textfile
  182.   (dest "ENV:XAUTHORITY")
  183.   (append "X11:.Xauthority\n")
  184.  )
  185.  (if (not env-equal-envarc)
  186.   (copyfiles
  187.    (dest "ENVARC:")
  188.    (source "ENV:XAUTHORITY")
  189.   )
  190.  )
  191.  (textfile
  192.   (dest "ENV:XFILESEARCHPATH")
  193.   (append "x11:lib/x11/%T/%N\n")
  194.  )
  195.  (if (not env-equal-envarc)
  196.   (copyfiles
  197.    (dest "ENVARC:")
  198.    (source "ENV:XFILESEARCHPATH")
  199.   )
  200.  )
  201. )
  202.  
  203. (procedure add-to-startup
  204.  (set startup-addition (cat
  205.   ";BEGIN AmiWin 2.22d\n"
  206.   "assign X11: \"" (tackon @default-dest "X11") "\"\n"
  207.   "path X11:bin add\n"
  208.   ";END AmiWin 2.22d\n"
  209.   )
  210.  )
  211.  (if
  212.   (askbool
  213.    (prompt "Do you want Installer to make the required "
  214.     "changes to your s:user-startup script ?")
  215.    (help "AmiWin requires some additions to your "
  216.     "s:user-startup script. Installer will make these "
  217.     "changes for you, or you can choose to skip this "
  218.     "step and make the changes yourself.")
  219.   )
  220.   (startup @app-name
  221.    (command startup-addition)
  222.    (prompt "Installer will modify your s:user-startup "
  223.     "script. The following lines will be appended to "
  224.     "it:\n\n" startup-addition)
  225.    (help "AmiWin requires some additions to your "
  226.     "s:user-startup script, that Installer is about to make.")
  227.   )
  228.   (textfile (dest (tackon @default-dest "addition-to-user-startup"))
  229.    (append startup-addition)
  230.   )
  231.  )
  232. )
  233.  
  234. ;;;; Start
  235.  
  236. ;(welcome "Welcome to the AmiWin 2.22demo installation.\n")
  237.  
  238. (set app-name "AmiWin 2.22demo")
  239.  
  240. (check-system-version)
  241.  
  242. (complete 0)
  243.  
  244. (set source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon))
  245.  (expandpath @icon))
  246. )
  247.  
  248. (select-destination-directory)
  249.  
  250. (if (not (exists (tackon @default-dest "x11")))
  251.  (makedir (tackon @default-dest "x11") (infos))
  252. )
  253.  
  254. (makeassign "X11" (tackon @default-dest "x11"))
  255.  
  256. (complete 10)
  257.  
  258. (copy-files-to-destination)
  259.  
  260. (complete 70)
  261.  
  262. (run (cat "protect x11:bin/startx +s"))
  263.  
  264. (complete 75)
  265.  
  266. (copy-ppipc)
  267.  
  268. (complete 80)
  269.  
  270. (ask-config)
  271.  
  272. (set-env-vars)
  273.  
  274. (complete 90)
  275.  
  276. (add-to-startup)
  277.  
  278. (complete 100)
  279.  
  280. (exit "Installation of AmiWin 2.22demo finished.\n\n"
  281.  "You should reboot your machine now. After that to "
  282.  "start AmiWin type 'startx'")
  283.